//
//  Untitled.swift
//  ANOA
//
//  Created by 邱仙凯 on 2025/1/12.
//  Copyright © 2025 zwb. All rights reserved.
//

import UIKit

class BaseTicketCell: UITableViewCell  {
    
    var line:UIView = {
        var v = UIView()
        v.backgroundColor = UIColor(kshex: "f5f5f5")
        return v
    }()
    
    var bg:UIView = {
        var v = UIView()
        v.backgroundColor = .white
        return v
    }()
    var bgW:CGFloat = 0
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.backgroundColor = .clear
        contentView.backgroundColor = Theme.commonBg
        self.selectionStyle = .none
        contentView.addSubview(bg)
        bgW = KSGlobal.screenW - 12
        bg.snp.makeConstraints { make in
            make.top.equalToSuperview()
            make.width.equalTo(bgW)
            make.centerX.equalToSuperview()
            make.bottom.equalToSuperview().offset(-1)

        }
        contentView.addSubview(line)
        line.snp.makeConstraints { make in
            make.bottom.equalToSuperview()
            make.height.equalTo(1)
            make.left.equalToSuperview().offset(6)
            make.right.equalToSuperview().offset(-6)
        }
    }
    func setLineHidden(_ flag:Bool) {
        line.isHidden = flag
    }
    
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    

}
